package com.geralt.im.gui;

import java.util.HashMap;
import java.util.Map;

import javax.swing.JFrame;

import com.geralt.im.uicontroller.IUIListener;

public class UIHolder implements IUIListener{
	private Map<String,JFrame> uis;
	public UIHolder(){
		uis = new HashMap<String, JFrame>();
	}
	public void addUI(String name, JFrame ui){
		uis.put(name, ui);
	}
	@Override
	public void showUI(String name) {
		uis.get(name).setVisible(true);
	}
	@Override
	public void hideUI(String name) {
		uis.get(name).setVisible(false);		
	}
	
}
